A New String Matching Algorithm
نویسندگان
چکیده
The string matching problem that appears in many applications like word processing, information retrieval, bibliographic search, molecular biology, etc., consists in finding the first or all the occurrences of a pattern in a text, where the pattern and the text are strings over the same alphabet. Many algorithms for solving this problem exist in literature [10, 20]. The naive (brute force) algorithm [7] locates all occurrences in time O(nm), where m is the length of the pattern and n is the length of the text. Hashing provides a simple method [15] that runs in linear time in most practical situations. A minimal DFA recognizing the language Sx, where x[0:m7 1] is the pattern over the alphabet S of size s, can be used to locate all the occurrences of x in the text y[0:n7 1] by examining each text character exactly once [7]. But the construction of the DFA requires O(sþm) time and O(sm) space. Simon [14, 18, 19] showed that this DFA can be constructed in O(m) time and space by introducing a delay bounded by O(s) per text character and his algorithm never performs more than 2n7 1 text character comparisons. However, the first linear time string-matching algorithm was discovered by Morris and Pratt [17], and was later improved by Knuth et al. [16]. The search behaves like a recognition
منابع مشابه
A New RSTB Invariant Image Template Matching Based on Log-Spectrum and Modified ICA
Template matching is a widely used technique in many of image processing and machine vision applications. In this paper we propose a new as well as a fast and reliable template matching algorithm which is invariant to Rotation, Scale, Translation and Brightness (RSTB) changes. For this purpose, we adopt the idea of ring projection transform (RPT) of image. In the proposed algorithm, two novel s...
متن کاملW-Period Technique for Parallel String Matching
In this paper, we present new approach for parallel string matching. Some known parallel string matching algorithms are considered based on duels by witness which focuses on the strengths and weaknesses of the currently known methods. This has applications such as string databases, Information Retrieval and computational biology. The new ‘divide and conquer’ approach has been introduced for par...
متن کاملMultithreaded Implementation of Hybrid String Matching Algorithm
Reading and taking reference from many books and articles, and then analyzing the Navies algorithm, Boyer Moore algorithm and Knuth Morris Pratt (KMP) algorithm and a variety of improved algorithms, summarizes various advantages and disadvantages of the pattern matching algorithms. And on this basis, a new algorithm – Multithreaded Hybrid algorithm is introduced. The algorithm refers to Boyer M...
متن کاملFast and Practical Approximate String Matching
We present new algorithms for approximate string matching based in simple, but eecient, ideas. First, we present an algorithm for string matching with mismatches based in arithmetical operations that runs in linear worst case time for most practical cases. This is a new approach to string searching. Second, we present an algorithm for string matching with errors based on partitioning the patter...
متن کاملVery Fast and Simple Approximate String Matching
We improve the fastest known algorithm for approximate string matching. This algorithm can only be used for low error levels. By using a new algorithm to verify potential matches and a new optimization technique for biased texts (such as English), the algorithm becomes the fastest one for medium error levels too. This includes most of the interesting cases in this area.
متن کاملA fast implementation of the Boyer–Moore string matching algorithm
String matching is the problem of finding all the occurrences of a pattern in a text. We present a new method to compute a combinatorial shift function (“best matching shift”) of the well-known Boyer–Moore string matching algorithm. Moreover we conduct experiments showing that the algorithm using this best matching shift is the most efficient in particular cases such as the search for patterns ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Int. J. Comput. Math.
دوره 80 شماره
صفحات -
تاریخ انتشار 2003